<!DOCTYPE html>
<html>

<head>
    <title></title>
    <script src="js/jquery-1.8.3.min.js"></script>
</head>

<body>
    {{.Website}}
    <script type="text/javascript">
    $.ajax({
        url: '/news/search?id=1&name=xxx',
        type: "get",
        dataType: "json",
        success: function(res) {
            console.log("=====")
            console.log(res)
            console.log("成功");
        },
        error: function(res) {
            console.log("失败");
        }
    });
     $.ajax({
        url: '/news/xxx',
        type: "get",
        dataType: "json",
        success: function(res) {
            console.log("=====")
            console.log(res)
            console.log("成功");
        },
        error: function(res) {
            console.log("失败");
        }
    });
      var json = {
        id: 1,
        title: "xxx",
        url:"https://www.baidu.com"
        }
        $.ajax({
            url: '/news/searchAll',
            type: "post",
            dataType: "json",
            data: JSON.stringify(json),
            success: function(res) {
                console.log("****")
                console.log(res)
                console.log("成功");
            },
            error: function(res) {
                console.log("失败");
            }
        });
    </script>
</body>

</html>